package vfs.obj.association.impl;

import java.sql.Connection;
import java.util.Iterator;
import vfs.filter.VFSFilter;
import vfs.obj.association.VFSUserToHomeDirectory;
import vfs.obj.entity.VFSNode;
import vfs.obj.entity.VFSUser;
import vfs.persist.association.VFSUserToHomeDirectoryManager;
import vfs.persist.association.impl.VFSUserToHomeDirectoryManagerImpl;

/**
 *
 * @author Matthew Eavenson <durandal@uga.edu>
 */
public class VFSUserToHomeDirectoryImpl implements VFSUserToHomeDirectory{

    private VFSUserToHomeDirectoryManager manager;
    
    public VFSUserToHomeDirectoryImpl(Connection conn){
        manager = new VFSUserToHomeDirectoryManagerImpl(conn);
    }
    
    @Override
    public Iterator<VFSUser> getUsers(VFSNode node, VFSFilter filter){
        return manager.getUsers(node, filter);
    }

    @Override
    public VFSNode getHomeDirectory(VFSUser user){
        return manager.getHomeDirectory(user);
    }

    @Override
    public void setHomeDirectory(VFSUser user, VFSNode directory){
        manager.setHomeDirectory(user, directory);
    }
    
}
